package com.ctshk.rpc.system.req;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.util.List;

/**
 * <p>
 * 菜单功能按钮权限
 * </p>
 *
 * @author 谢诗宏
 * @since 2020-12-31
 */
@Data
@ApiModel(value="PermissionDataReq对象", description="设置菜单功能按钮请求对象")
public class PermissionDataReq implements Serializable {

    @NotNull(message = "菜单id必填")
    @ApiModelProperty(value = "菜单id", required = true)
    private Long menuId;

    @NotNull(message = "用户id必填")
    @ApiModelProperty(value = "用户id", required = true)
    private Long userId;

    @ApiModelProperty(value = "自定义权限人员范围数组(dataType==4时必填)")
    private List<PermissionDataScopeReq> employees;

    @ApiModelProperty(value = "自定义权限部门范围数组(dataType==4时必填)")
    private List<PermissionDataScopeReq> depts;

    @ApiModelProperty(value = "所选功能按钮")
    private List<Long> buttonIds;

    @ApiModelProperty(value = "权限数据类型(1:全公司;2:仅部门;3:仅自己;4:自定义)")
    private Integer dataType;

    @ApiModelProperty(value = "清楚原有菜单权限 默认清除")
    private boolean addFlage = true;
}
